# 检测角点特征

import cv2
import numpy as np

img = cv2.imread('image/chess_board.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
gray = np.float32(gray)
dst = cv2.cornerHarris(src=gray, blockSize=2, ksize=23, k=0.04)
img[dst > 0.01*dst.max()] = [0, 0, 255]
while True:
    cv2.imshow('corner', img)
    if cv2.waitKey(1000//12) & 0xFF == ord("q"):
        break

cv2.destroyAllWindows()
